﻿<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="PasswordRecovery.aspx.cs" Inherits="webapp4U.UI.PasswordRecovery" %>
<%@ Register Src="~/Controls/Title.ascx" TagName="Title" TagPrefix="uc" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register TagPrefix="webapp4U" Namespace="webapp4U.UI" %>


<asp:Content ID="MainContent" ContentPlaceHolderID="PageContent" Runat="Server">

<uc:Title runat="server" ID="Title" />

<table border="0" align="center" width="500px">
    <tr>
        <td>
           <div style="line-height:20px;"><%=ResourceManager.GetString("Membership_ForgotPassword_Title") %></div>
           <p></p>
           <asp:PasswordRecovery ID="PasswordRecovery1" runat="server">
              <UserNameTemplate>
                 <div class="sectionsubtitle">&nbsp;</div>
                 <table cellpadding="2">
                    <tr>
                       <td style="width: 80px;" class="fieldname"><asp:Label runat="server" ID="lblUsername" AssociatedControlID="UserName" Text="Username:" /></td>
                       <td style="width: 300px;"><asp:TextBox ID="UserName" runat="server" Width="100%"></asp:TextBox></td>
                       <td>
                          <asp:RequiredFieldValidator ID="valRequireUserName" runat="server" ControlToValidate="UserName" SetFocusOnError="true" Display="Dynamic"
                             ErrorMessage="Username is required." ToolTip="Username is required." ValidationGroup="PasswordRecovery1">*</asp:RequiredFieldValidator>
                       </td>            
                    </tr>
                    <td colspan="3" style="text-align: right;">
                       <asp:Label ID="FailureText" runat="server" SkinID="FeedbackKO" EnableViewState="False" /> 
                       <asp:Button ID="SubmitButton" runat="server" CommandName="Submit" Text="Submit" ValidationGroup="PasswordRecovery1" />
                    </td>
                 </table>         
              </UserNameTemplate>
              <QuestionTemplate>
                 <div class="sectionsubtitle">Step 2: answer the following question</div>
                 <p></p>
                 <table cellpadding="2">
                    <tr>
                       <td style="width: 80px;" class="fieldname">Username:</td>
                       <td style="width: 300px;"><asp:Literal ID="UserName" runat="server"></asp:Literal></td>
                       <td></td>            
                    </tr>
                    <tr>
                       <td class="fieldname"><asp:Label runat="server" ID="lblQuestion" AssociatedControlID="Question" Text="Question:" /></td>
                       <td><asp:Literal ID="Question" runat="server"></asp:Literal></td>
                       <td></td>            
                    </tr>
                    <tr>
                       <td class="fieldname"><asp:Label runat="server" ID="lblAnswer" AssociatedControlID="Answer" Text="Answer:" /></td>
                       <td><asp:TextBox ID="Answer" runat="server" Width="100%"></asp:TextBox></td>
                       <td>
                          <asp:RequiredFieldValidator ID="valRequireAnswer" runat="server" ControlToValidate="Answer" SetFocusOnError="true" Display="Dynamic"
                             ErrorMessage="Answer is required." ToolTip="Answer is required." ValidationGroup="PasswordRecovery1">*</asp:RequiredFieldValidator>
                       </td>
                    </tr>
                    <tr>
                       <td colspan="3" style="text-align: right;">
                          <asp:Label ID="FailureText" runat="server" SkinID="FeedbackKO" EnableViewState="False" /> 
                          <asp:Button ID="SubmitButton" runat="server" CommandName="Submit" Text="Submit" ValidationGroup="PasswordRecovery1" />                     
                       </td>
                    </tr>
                 </table>         
              </QuestionTemplate>      
              <SuccessTemplate>
                 <p align="center">
                    <asp:Label runat="server" ID="lblSuccess" Font-Bold="true" ForeColor="blue"
                        Text="Mật khẩu mới đã được gởi vào email của bạn." />
                 </p>
              </SuccessTemplate> 
              <MailDefinition
                 BodyFileName="~/Membership/PasswordRecoveryMail.txt"
                 From="info@vangvietnam.info"
                 Subject="Nữ Trang Viet Nam: your password">
              </MailDefinition>    
           </asp:PasswordRecovery>
        </td>
    </tr>
</table>

   
   
   
</asp:Content>

